package com.strategy.improve.self;

public abstract class School {

    private Behavior behavior;

    public School(Behavior behavior) {
        this.behavior = behavior;
    }

    public void setBehavior(Behavior behavior) {
        this.behavior = behavior;
    }

    public void teaching(){
        if(this.behavior!=null){
            this.behavior.dictate();
        }
    }

    public abstract void display();

    public void transmit(){
        System.out.println("传授知识");
    }

    public void cultivate(){
        System.out.println("培养学生");
    }
}
